// 将手机号顺序打乱，进行用户名的脱敏处理
const shuffle = (phone) => {
    const arr = Array.from(phone);
    const len = arr.length;
    for (let i = 0; i < len - 1; i++) {
        let index = parseInt(Math.random() * (len - i));
        let temp = arr[index];
        arr[index] = arr[len - i - 1];
        arr[len - i - 1] = temp;
    }
    return arr.join('');
}
export default shuffle;